#include "GameObject.h"

GameObject::GameObject()
{
}

GameObject::~GameObject()
{
}

void GameObject::Initialize()
{
}

void GameObject::Update(float pDeltaTime)
{
	if (m_xSprite != nullptr)
	{
		m_xSprite->setPosition(m_vPosition);
	}
}

void GameObject::Cleanup()
{
	m_xDisplayManager->DeleteDrawable(m_xSprite);
	m_xSprite = nullptr;
}

void GameObject::SetPosition(sf::Vector2f pvPostion)
{
	m_vPosition = pvPostion;
}

void GameObject::SetPosition(float pPosX, float pPosY)
{
	m_vPosition.x = pPosX;
	m_vPosition.y = pPosY;
}

void GameObject::Move(sf::Vector2f pvOffset)
{
	sf::Vector2f pTemp = m_vPosition;
	m_vPosition = sf::Vector2f(pTemp.x + pvOffset.x, pTemp.y + pvOffset.y);
}

void GameObject::Move(float pOffX, float pOffY)
{
	sf::Vector2f pTemp = m_vPosition;
	m_vPosition = sf::Vector2f(pTemp.x + pOffX, pTemp.y + pOffY);
}